<?xml version="1.0" encoding="UTF-8"?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns="http://www.w3.org/1999/xhtml" version="2.1">
	<jsp:directive.page contentType="text/html; charset=UTF-8" />
	<jsp:directive.page isELIgnored="false" />
	<jsp:output omit-xml-declaration="false" doctype-root-element="HTML"
		doctype-system="about:legacy-compat" />
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />

<title>Ikex</title>
<link rel="shortcut icon" href="${pageContext.request.contextPath }/img/favicon.png" />
<link rel="stylesheet"
	href="${pageContext.request.contextPath }/css/estilos.css"
	type="text/css" media="screen" charset="utf-8" />

<link rel="stylesheet"
	href="${pageContext.request.contextPath }/css/menuLateral.css"
	type="text/css" media="screen" charset="utf-8" />



<meta name="description" content="" />
<meta name="author" content="Emilio Javier Castillo Gonzalez" />
<script type="text/javascript" language="javascript" src="${pageContext.request.contextPath }/js/stock/fueraStock.js">
<!-- a -->
</script>
<script type="text/javascript" language="javascript" src="${pageContext.request.contextPath }/js/aniadirProducto/verColeccion.js">
<!-- a -->
</script>


</head>


<body onload="cargarCalculoStock()">
	<c:import url="${pageContext.request.pathInfo}/jsp/menuLateral.jsp" />
	<div id="contenedor">
		<c:import url="${pageContext.request.pathInfo}/jsp/cabecera.jsp" />

		<div id="contenido" style="padding-top: 0px;">
			
			<div id="centro" style="margin-top: 0px;">
				<c:import url="${pageContext.request.pathInfo}/Admin/menuAdmin.jsp" />
				<c:import url="${pageContext.request.pathInfo}/Admin/menuProductos.jsp" />
				<div class="caja left" >
					<jsp:useBean id="productos" class="es.ikex.beans.ListaTipoProductosBean" scope="session" />
					<jsp:useBean id="proveedor" class="es.ikex.beans.ProveedorBean" scope="session" />
					<script type="text/javascript">
						var doc = document.getElementById("d");
						doc.setAttribute("class", "menuAdminHover");
					</script>
					<form action="${pageContext.request.contextPath }/archivo" method="post" enctype="multipart/form-data">
						<table class="tabla">
						<tr>
							<td><label for="nombre">Concepto</label></td>
							<td><input required="required" type="text" name="concepto" id="nombre"/></td>
						</tr>
						<tr>
							<td><label for="categoria">Categoria</label></td>
							<td>
								<select onchange="cargarTablaColecciones(this.value)" name="categoria" id="categoria" class="selectLargo">
									<c:forEach items="${productos.categoria }" var="cate">
										<option onclick="cargarTablaColecciones('${cate.codigo }')" value="${cate.codigo }">${cate.categoria }</option>
									</c:forEach>
								</select>
							</td>
						</tr>
						<script type="text/javascript">
							cargarTablaColecciones(document.getElementById('categoria').value);
						</script>
						<tr>
							<td><label for="coleccion">Coleccion</label></td>
							<td id="colecciones">
								
							</td>
						</tr>
						
						<tr>
							<td><label for="Descripcion">Descripcion</label></td>
							<td><input required="required"  type="text" name="descripcion" id="descripcion"/></td>
						</tr>
						
						<tr>
							<td><label for="proveedor">Proveedor</label></td>
							<td>
								<select name="proveedores" id="proveedor" class="selectLargo">
									<c:forEach items="${proveedor.proveedores }" var="pro">
										<option value="${pro.codigo }">${pro.razonSocial }</option>
									</c:forEach>
								</select>
							</td>
						</tr>
						
						<tr>
							<td><label for="precio">Precio</label></td>
							<td><input required="required"  type="number"  min="0.01" step="0.01" name="precio" id="precio"/></td>
						</tr>
						
						<tr>
							<td><label for="stock">Stock</label></td>
							<td><input  required="required" type="number" step="1" min="0" name="stock" id="stock"/></td>
						</tr>
						
						<tr>
							<td><label for="stockMin">Stock minimo</label></td>
							<td><input  required="required" type="number" step="1"  min="0" name="stockMinimo" id="stockMin"/></td>
						</tr>
						
						<tr>
							<td><label for="medidas">Medidas</label></td>
							<td>
								<input  required="required" type="number" step="0.01" min="0.01" name="alto" id="medidas" class="estrecho"/>
								<input  required="required" type="number" step="0.01" min="0.01" name="ancho" class="estrecho"/>
								<input  required="required" type="number" step="0.01" min="0.01" name="profundidad" class="estrecho"/>
							</td>
						</tr>
						
						<tr>
							<td><label for="foto">Foto</label></td>
							<td><input type="file" name="foto" id="foto"/></td>
						</tr>
						
						<tr>
							<td></td>
							<td><input type="submit" name="subir" value="Subir" /></td>
						</tr>
						
						</table>
						<span style="color: red;">${error }</span>
					</form>
				</div>
				<div style="clear: both;"></div>
			</div>

			<div id="der"></div>
		</div>
	</div>
	 <script type="text/javascript">
	 	
	</script>
</body>
</html>
</jsp:root>